﻿using UnityEngine;

namespace KuiHuaBaoDian.Services.Guide {

    [NodeTitle("前置引导")]
    public sealed class GuideTrigger_PreGuide : GuideTrigger {

        public readonly struct TriggerKey : IGuideTriggerKey {
        }

        public override IGuideTriggerKey Key => new TriggerKey { };

        public override GuideTriggerType Type => GuideTriggerType.Validate;

        public override bool Validate() {
            var section = GuideService.Instance.GetSectionByID(m_ID);
            if (section != null && section.IsDone) {
                return true;
            }
            return false;
        }

        [SerializeField, Label("ID")]
        private int m_ID;
        public int ID => m_ID;
    }
}
